home *** CD-ROM | disk | FTP | other *** search
/ Champak 64 / Volume 64 - JOGO DISK .iso / Games / We_Are_Human.swf / scripts / DefineSprite_38_shot / frame_1 / DoAction.as
Text File  |  2008-04-25  |  373b  |  15 lines

  1. Xd = _root.p1.bod.spike.Xd;
  2. Yd = _root.p1.bod.spike.Yd;
  3. radAngle = Math.atan2(Yd,Xd);
  4. _rotation = _root.p1.bod.spike._rotation;
  5. _root.spike.push(this);
  6. onEnterFrame = function()
  7. {
  8.    if(this._x > 700 or _X < -200 or _Y > 700 or y < -200)
  9.    {
  10.       this.removeMovieClip();
  11.    }
  12.    this._x += Math.cos(radAngle) * 15;
  13.    this._y += Math.sin(radAngle) * 15;
  14. };
  15.